/*
* Poppy Game Engine - https://pgetemplate.googlecode.com/svn/
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2008 Poppy
*/

#pragma once

#include <Windows.h>
#include "RendererDefines.h"

namespace PGERenderer
{

	class CWinInit
	{
		friend class CPSPDriver;
	public:

		CWinInit( LPCTSTR app = TEXT("PGE PC DEBUGER"), LPCTSTR title = TEXT("PGE PC DEBUGER"), INT x = NULL, INT y = NULL, INT width = PSP_SCREEN_WIDTH, INT height = PSP_SCREEN_HEIGHT, HINSTANCE hins = NULL );

		BOOL InitWindow();

		VOID DestoryWindow();

		static LRESULT WndProc(::HWND hWnd, ::UINT message, ::WPARAM wParam, ::LPARAM lParam);

		static BOOL SetUserCallBack( WNDPROC callBack );

	protected:

		HINSTANCE		mHInstance;
		HWND			mHWnd;
		LPCTSTR			mAppName;
		LPCTSTR			mTitleName;
		INT				mX, mY, mWidth, mHeight;
		WNDCLASSEX		mWndClass;
		static WNDPROC	mUserCallBack;
	};

}